<?xml version="1.0" encoding="ASCII"?>
<FLOW>

	<PACKAGE_INSTALL>
	</PACKAGE_INSTALL>
	
	
	
	<SILENT_INSTALL>
		<IF cmd="check_option" param0="install_vc" param1="TRUE">
			<TRUE>
			 		<IF cmd="is_vc_installed" param0="INSTALL_VC" param1="VC_REDIST">	 		
						<FALSE> <COMMAND cmd="execute_file_wait" param0="$INST_SRC_DIR$\DATA\vcredist_x86.exe" param1="/q /r:n" param2="INSTALL_VC" /> </FALSE>
					</IF>
			</TRUE>
		</IF>
		<COMMAND cmd="set_setup_type" param0="INSTALL" />
		<COMMAND cmd="check_spooler" />
		<COMMAND cmd="set_install_mode" param0="SILENT_INST" />		
		<!-- Search Component 
		<COMMAND cmd="search_components"/>
		-->
		
		<COMMAND cmd="WRITE_ITEM_INFO" /> 	
		<COMMAND cmd="copy_all_files" /> 		
		<IF cmd="check_option" param0="install_vc" param1="TRUE">
			<COMMAND cmd="wait_install_vc" /> 
		</IF>
		<COMMAND cmd="install" dwparam="1"/>
		<COMMAND cmd="system_install_update" />		
		
		<!-- 
			*
			* Create Total Uninstaller shortcut
			*
		-->	
		<IF cmd="check_file" param0="$DEST_INST_DIR$\MANUAL\__MODEL__\$MANUAL_LANG_DIR$\start_here.htm" >
			<TRUE>
				<COMMAND cmd="create_shortcut" param0="MANUAL_VIEWER_SHORTCUT" />
				<COMMAND cmd="create_shortcut" param0="MANUAL_VIEWER_SHORTCUT_MUI" />
				<COMMAND cmd="execute_file" param0="$INST_SRC_DIR$\bin\ViewUserGuide.exe" param1="/install /n __MFG__"/>			
			</TRUE>
		</IF>

    <COMMAND cmd="add_reg" param0="WSP_PSU_KEY" /> <!--For EPM WSP Wizard-->
		
		<COMMAND cmd="create_shortcut" param0="TOTAL_UNINSTALL_SHORTCUT_MUI" />
		
	<!--	<COMMAND cmd="refresh_system" />	-->		
	</SILENT_INSTALL>
	
	
	
	<SILENT_UNINSTALL>		
		<COMMAND cmd="set_setup_type" param0="UNINSTALL" />
		
		<COMMAND cmd="set_install_mode" param0="SILENT_INST" />		
		
		<!-- Search Component -->
		<COMMAND cmd="search_components"/>
		
		<COMMAND cmd="WRITE_ITEM_INFO" />
		
		<COMMAND cmd="uninstall" dwparam="1"/>		
		<COMMAND cmd="system_uninstall_update" />		
	<!--	<COMMAND cmd="refresh_system" />	-->		
	</SILENT_UNINSTALL>


<!--
			*
			*
			*	cmd param0,1,2,3,4.  wparam
			*
			*
-->

<!--
			Variables
			
			1) VAR.INSTALL_TYPE : Installation Type
				 
				 - install_now
				 - custom_install
				 - software_only  (not used)
				 - remote_install (not used)
				 - custom_utility (not used)
				 - wireless_setup
			
			2) VAR.CONNECTION_TYPE : Connectinon type, DON'T CHANGE the following defined string, because the strings are defined in core code.
			   
			   - LOCAL_QUICK_FOUND
			   - LOCAL_CONNECTION
			   - NETWORK_CONNECTION
			   - WIRELESS_CONNECTION
			   - SET_IP_CONNECTION
			   - NO_CONNECTION
			
			3) VAR.BOOL.CONNECT : Printer is connected or not
			   
			   - TRUE
			   - FALSE
-->			
			
	<INSTALL>

		<COMMAND cmd="set_setup_type" param0="INSTALL" />
		
		<COMMAND cmd="start_cmd_thread" param0="FLOW_INIT"/>
		
		<LABEL>START_STEP</LABEL> 
		
		<!-- Init variables -->
		<COMMAND cmd="set_variable" param0="VAL.CONNECTION_TYPE" param1="NOT_DEFINE"/>
		<COMMAND cmd="set_variable" param0="VAR.BOOL.CONNECT" param1="TRUE"/>
		<COMMAND cmd="set_variable" param0="VAR.BOOL.WEB_AGREE_DONE" param1="NOT_DEFINE"/>
		<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="NOT_DEFINE"/>
		<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG.TYPE" param1="USB"/>   <!-- default : USB -->
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_AUTO" param1="TRUE"/>


		
		
		<!-- Check PNP -->
		<!--	
		<IF cmd="is_pnp_in_progress">
			<TRUE>
				<COMMAND cmd="open_dlg" param0="WAIT_PNP" step_dlg="FALSE" />
			</TRUE>
		</IF>
		-->	
		
		
		<!--
			*
			*
			*	Main Screen
			*
			*
		-->
		
		
		<LABEL>START</LABEL>

	
		<!-- Set History Panle -->
		<IF cmd="check_option" param0="smartupdate" param1="TRUE" >
			<TRUE>	<COMMAND cmd="set_history" param0="HISTORY_PANEL_INSTALL"/>    </TRUE>
			<FALSE>	<COMMAND cmd="set_history" param0="HISTORY_PANEL_INSTALL_SU"/> </FALSE>
		</IF>
		
		
		
		
		
		
		
		<!--
			*
			*
			*	Welcome
			*
			*
			-->
		

		<COMMAND cmd="set_history_section" param0="WELCOME" step_dlg="TRUE"/>			
				
		<IF cmd="check_option" param0="internet_usage" param1="FALSE">
			<TRUE><COMMAND cmd="open_dlg" param0="MAIN_WELCOME_NO_AMPV" step_dlg="TRUE"/></TRUE>
			<FALSE><COMMAND cmd="open_dlg" param0="MAIN_WELCOME" step_dlg="TRUE"/></FALSE>			
		</IF>

		<!-- History Panel Section Setting -->
		<COMMAND cmd="set_history_section" param0="FIND_PRINTER" step_dlg="TRUE"/>
		
	
	
	
		<!-- 
		*
		*	If USB Only, find local printer and if not found, show USB Connect Dialog
		*
		-->
		<IF cmd="check_option" param0="network" param1="FALSE" operator="AND" cmd_1="check_option" param0_1="wireless" param1_1="FALSE">
			<TRUE>
				<IF cmd="find_local_printer" param0="SET_PORT">
					<TRUE>
						<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="FOUND_MODEL_SHOW_ONE"/>
						<GOTO>PRINTER_FOUND_STEP</GOTO> 
					</TRUE>
				</IF>
			</TRUE>
		</IF>
		

		<!--
			*
			*
			*	Search Local Printer first if wireless is not supported.
			*
			*
		-->	
		<IF cmd="check_option" param0="wireless" param1="FALSE">
			<TRUE>			
				<IF cmd="find_local_printer" param0="SET_PORT">
					<TRUE>
						<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="FOUND_MODEL_USB_QUICK"/>
						<GOTO>SELECT_CONNECT_TYPE</GOTO> 
					</TRUE>
				</IF>
			</TRUE>
		</IF>	
		
		
		<!-- 
			*
			*
			* Select Connection Type
			*
			*
		-->
			
		<LABEL>SELECT_CONNECT_TYPE</LABEL>
		
		<COMMAND cmd="set_variable" param0="VAL.SEACHING.PARAM" param1=""/>
		
		<IF cmd="check_option" param0="default_connect_usb" param1="FALSE"> 
			<TRUE>  <COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG.TYPE" param1="NETWORK"/> </TRUE>			
		</IF>
	
		<SWITCH cmd="open_dlg" param0="SELECT_CONNECTION_EX" param1="#VAL.CONNECTION_DIALOG.TYPE#" step_dlg="TRUE">
			
			<!-- LOCAL -->
			<CASE value="0"> <COMMAND cmd="set_variable" param0="VAL.CONNECTION_TYPE" param1="LOCAL_CONNECTION"/> <GOTO>LOCAL_CONNECTION</GOTO></CASE>
									
			<!-- Network -->
			<CASE value="1"> <COMMAND cmd="set_variable" param0="VAL.CONNECTION_TYPE" param1="NETWORK_CONNECTION"/>
				<COMMAND cmd="set_variable" param0="VAL.SEACHING.PARAM" param1="Network"/>
				<GOTO>NETWORK_CONNECTION</GOTO>
			</CASE>
			
			<!-- Wireless -->
			<CASE value="2"> <COMMAND cmd="set_variable" param0="VAL.CONNECTION_TYPE" param1="WIRELESS_CONNECTION"/> 
				<COMMAND cmd="set_variable" param0="VAL.SEACHING.PARAM" param1="Wireless"/>
				<GOTO>WIRELESS_CONNECTION</GOTO>
			</CASE>
				
			

			<!-- Set IP 
			<CASE value="100"> <COMMAND cmd="set_variable" param0="VAL.CONNECTION_TYPE" param1="SET_IP_CONNECTION"/> <GOTO>SET_IP_CONNECTION</GOTO></CASE>
			
			<CASE value="200"> <GOTO>START</GOTO></CASE>
			-->
			
			<!-- Not Connected -->
			<DEFAULT>	<COMMAND cmd="set_variable" param0="VAL.CONNECTION_TYPE" param1="NO_CONNECTION"/> </DEFAULT>
			
		</SWITCH>
		
		<GOTO>NO_CONNECTION</GOTO>
		
		
		
		
		
		
		
		
		
		
		
		
		
		<!-- 
			*
			*
			*	Local Connection
			*
			*
		 -->
		<LABEL>LOCAL_CONNECTION</LABEL>
		
		<IF cmd="find_local_printer" param0="SET_PORT">
			<FALSE> <COMMAND cmd="open_dlg" param0="GUIDE_USB" step_dlg="FALSE"/> </FALSE>
		</IF>
		
		<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="FOUND_MODEL_SHOW_ONE"/>
		<GOTO>SELECT_SOFTWARE_STEP</GOTO>
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		<!-- 
			*
			*
			*	Network Connection
			*
			*
		 -->
		<LABEL>NETWORK_CONNECTION</LABEL>
		
		<SWITCH cmd="open_dlg" param0="SELECT_SETUP_TYPE_NETWORK" step_dlg="TRUE">	
			<!-- Yes -->
			<CASE value="0">
				<IF cmd="open_dlg" param0="GUIDE_NETWORK" step_dlg="TRUE">
					<TRUE>  <!-- Check Set IP -->
						<COMMAND cmd="set_variable" param0="VAL.CONNECTION_TYPE" param1="SET_IP_CONNECTION"/> 
						<GOTO>SET_IP_CONNECTION</GOTO>
					</TRUE>
				</IF>
			</CASE>			
		</SWITCH>

		
		
		
		<LABEL>SEARCH_NETWORK</LABEL>
		<SWITCH cmd="open_dlg" param0="SEARCHING" param1="#VAL.SEACHING.PARAM#">
					
			<!-- Not found -->
			<CASE value="0"> <GOTO>NOT_FOUND_STEP</GOTO> </CASE>
			
			<!-- 1 or more found -->
			<DEFAULT>
				<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="FOUND_MODEL_LIST"/>
				<GOTO>PRINTER_FOUND_STEP</GOTO> 
			</DEFAULT>
			
		</SWITCH>
		
		
		
		<!-- Not Found -->
		<LABEL>NOT_FOUND_STEP</LABEL>
		<SWITCH cmd="open_dlg" param0="MODEL_NOT_FOUND" step_dlg="TRUE">
		
			<CASE value="0"> <!-- Search Again-->	
				<COMMAND cmd="OPEN_DLG" param0="FIREWALL_NOTICE" step_dlg="FALSE" />
				
				<GOTO>SEARCH_NETWORK</GOTO>  
			</CASE>
			
			<!-- Direct Input -->
			<CASE value="1"> <GOTO>DIRECT_INPUT_STEP</GOTO> </CASE>
			
			<!-- SetIP -->
			<CASE value="2"> <GOTO>SET_IP_CONNECTION</GOTO> </CASE>	
			
			<!-- Wireless Setting -->
			<CASE value="3"> <GOTO>WIRELESS_CONNECTION</GOTO> </CASE>

			<!-- Default : Goto No Connection (?) -->							
			<DEFAULT> <GOTO>NO_CONNECTION</GOTO> </DEFAULT>
			
		</SWITCH>
		
		
		<!-- 
			*
			*
			*	Direct Input
			*
			*
			-->
		<GOTO>DIRECT_INPUT_STEP_END</GOTO>	
		
		<LABEL>DIRECT_INPUT_STEP</LABEL>
		<SWITCH cmd="OPEN_DLG" param0="MANUAL_SEARCH_MODEL" param1="MAIN" step_dlg="FALSE">
			
			<!-- Range Search -->
			<CASE value="100"> <GOTO>SEARCH_NETWORK</GOTO> </CASE>
			
		<!-- navigation_panel="NAVI_BACK_GOTO"
			<CASE value="200">
				<IF cmd="check_variable" param0="VAL.MANUAL_SEARCH_MODEL_PATH" param1="NOT_FOUND">
					<TRUE> 
						<GOTO>SELECT_CONNECT_TYPE</GOTO>
					</TRUE>
					<FALSE> 
						<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="FOUND_MODEL_LIST"/>
						<GOTO>PRINTER_FOUND_STEP</GOTO>	
					</FALSE>					
				</IF>
			</CASE>
		-->

			<!-- Printer Found -->
			<DEFAULT>	
				<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="FOUND_MODEL_SHOW_ONE"/>
				<GOTO>PRINTER_FOUND_STEP</GOTO>	
			</DEFAULT>
			
		</SWITCH>
				
		<LABEL>DIRECT_INPUT_STEP_END</LABEL>
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		<!-- 
			*
			*
			*	Wireless Connection
			*
			*
		 -->
 		<LABEL>WIRELESS_CONNECTION</LABEL>
				
		<SWITCH cmd="open_dlg" param0="SELECT_SETUP_TYPE_WIRELESS" step_dlg="TRUE">	
			<!-- No -->
			<CASE value="1"> <GOTO>SEARCH_NETWORK</GOTO></CASE>			
		</SWITCH>
		
		
				
		
		<COMMAND cmd="wsp_initialize" />

		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_METHOD" param1="NO"/>
		<COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT"/>
		<COMMAND cmd="set_variable" param0="VAL.WLAN_AVAILABLE" param1="NOT_DEFINE"/>
		
			
			

		
		<!--       
		================================================================
		Searching wireless printer -> If no printer, select wireless setting method : USB or wi-fi
		================================================================
		-->

		<LABEL>SELECT_WIRELESS_SETTING_METHOD</LABEL>
		
		<IF cmd="check_option" param0="wws" param1="FALSE">
			<TRUE><GOTO>WIRELESS_USB_WIFI_SETUP</GOTO></TRUE>
			<FALSE>
				
				<IF cmd="wsp_is_wlan_available" >
					<TRUE><COMMAND cmd="set_variable" param0="VAL.WLAN_AVAILABLE" param1="WLAN_SUPPORT"/></TRUE>
					<FALSE><COMMAND cmd="set_variable" param0="VAL.WLAN_AVAILABLE" param1="WLAN_NOT_SUPPORT"/></FALSE>
				</IF>
				
				<SWITCH cmd="open_dlg" param0="WSP_SELECT_WIRELESS_SETTING_METHOD" param1="#VAL.WLAN_AVAILABLE#" step_dlg="TRUE">
					<CASE value="0"> 
						<COMMAND cmd="open_dlg" param0="WSP_GUIDE_PRINTER_TURN_ON" />
						<GOTO>WIRELESS_WIRELESS_WIFI_SETUP</GOTO> 
					</CASE>					
					<CASE value="1"> <GOTO>WIRELESS_USB_WIFI_SETUP</GOTO> </CASE>				
				</SWITCH>
			</FALSE>
		</IF>
		
		<!--       
		================================================================
		Connect Printer Soft AP with Found SSID and the Network Key
		================================================================
		-->	
		<LABEL>WIRELESS_WIRELESS_WIFI_SETUP</LABEL>
		
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_METHOD" param1="YES"/>
		
		<COMMAND cmd="wsp_turnoff_networkwindow" />			
		

		<LABEL>WIRELESS_WIRELESS_DEVICE_CHECKING</LABEL>
		<COMMAND cmd="set_variable" param0="VAL.IGNORE_SSID" param1="FALSE"/>
		<COMMAND cmd="set_variable" param0="VAL.IGNORE_NETWORK_KEY" param1="FALSE"/>
		
		<SWITCH cmd="OPEN_DLG" param0="WSP_DEVICE_CHECKING_NETWORK" param1="WSP_CHECK_NETWORK">
			<!-- WSP_ERROR_INVALID_PROFILE 
				: Success to retrieve Wireless Data from the connected printer but PC profile is not available -->
			<CASE value="202"> 		
				<COMMAND cmd="set_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="WIFI"/>
			</CASE>
			
			<!-- WSP_CURRENT_SET_PROFILE 
				: Success to retrieve Wireless Data from the connected printer and PC profile is available -->
			<CASE value="201"> 	
				<COMMAND cmd="set_variable" param0="VAL.IGNORE_SSID" param1="TRUE"/>
				<COMMAND cmd="set_variable" param0="VAL.IGNORE_NETWORK_KEY" param1="TRUE"/>	
			</CASE>

			<!-- WSP_ONLY_PASSWORD_NEEDED 
				: Success to retrieve Wireless Data from the connected printer and only SSID is available -->
			<CASE value="203"> 		
				<COMMAND cmd="set_variable" param0="VAL.IGNORE_SSID" param1="TRUE"/>
			</CASE>
						
					
			<!-- Wireless setting error : Go to wireless setting through USB connection-->
			<CASE value="122">  				
				<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>	
			</CASE>
			
			<DEFAULT>  <!-- WSP_ERROR_SOFTAP_NOT_FOUND : 110 -->
				<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO> 		 
			</DEFAULT>
		</SWITCH>
		
		<!--
		
			Open WSP Confirm Dialog
		
		-->
		
		<SWITCH cmd="wsp_is_confirm_needed">			
			<CASE value="1">  <!-- PBC -->
				<LABEL>WSP_CI3_PUSH_WPS_STEP</LABEL>		
				<SWITCH cmd="OPEN_DLG" param0="WSP_PUSH_WPS" >
					<CASE value="3"> <!-- Time Out -->
						<SWITCH cmd="OPEN_DLG" param0="WSP_PUSH_WPS_RETRY" > 
							<CASE value="100"> <!-- Retry -->
								<GOTO>WSP_CI3_PUSH_WPS_STEP</GOTO>
							</CASE>
						</SWITCH>
					</CASE>
					
					<CASE value="1"> <!-- not started -->
						<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>
					</CASE>
					
					<CASE value="2"> <!-- not started -->
						<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>
					</CASE>					
				</SWITCH>
			</CASE>
			
			<CASE value="2">  <!-- GUI -->		
				<!-- <GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO> -->
				<LABEL>WSP_CI3_PUSH_WPS_GUI_STEP</LABEL>		
				<SWITCH cmd="OPEN_DLG" param0="WSP_PUSH_WPS_GUI" >
					<CASE value="3"> <!-- Time Out -->
						<SWITCH cmd="OPEN_DLG" param0="WSP_PUSH_WPS_RETRY_GUI" > 
							<CASE value="100"> <!-- Retry -->
								<GOTO>WSP_CI3_PUSH_WPS_GUI_STEP</GOTO>
							</CASE>
						</SWITCH>
					</CASE>
					
					<CASE value="1"> <!-- not started -->
						<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>
					</CASE>
					
					<CASE value="2"> <!-- not started -->
						<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>
					</CASE>					
				</SWITCH>				
			</CASE>
			
			<DEFAULT>
			</DEFAULT>
		</SWITCH>
		
		<!--
		
			Open Disconnect Wired cable Dialog
		
		-->
		<IF cmd="wsp_is_wired_connected">
			<TRUE><COMMAND cmd="OPEN_DLG" param0="WSP_DISCONNECT_WIRED_NETWORK" /></TRUE>
		</IF>
		
		
		<!--
		
			Open Select SSID Dialog
		
		-->
		<IF cmd="check_variable" param0="VAL.IGNORE_SSID" param1="FALSE">
			<TRUE><COMMAND cmd="open_dlg" param0="WSP_FOUND_MODEL_WWS" step_dlg="TRUE"/></TRUE>
		</IF>
		
		
		<!--
		
			Open Set Network Key Dialog
		
		-->
		<IF cmd="check_variable" param0="VAL.IGNORE_NETWORK_KEY" param1="FALSE">
			<TRUE><COMMAND cmd="open_dlg" param0="WSP_SECURITY_KEY" step_dlg="TRUE"/> </TRUE>
		</IF>
		
		
		<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO> 

		
		
		
		
		
		
		
		
		
		
		
		
		
		<!--       
		================================================================
		Connect Printer through USB
		================================================================
		-->	
		<LABEL>WIRELESS_USB_WIFI_SETUP</LABEL>
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_METHOD" param1="NO"/>

		
		<IF cmd="wsp_find_printer" >
			<FALSE><COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE" /></FALSE>
		</IF>
		
		

		<!--       
		================================================================
		Load Current Device Settings and Wireless Network List       
		================================================================
		-->	
		<LABEL>WIRELESS_CI3_CHECKING_DEVICE</LABEL>
		
		<SWITCH cmd="OPEN_DLG" param0="WSP_DEVICE_CHECKING" param1="WSP_CHECK">
		
			<!--  ERROR_DEVICE_DATA -->
			<CASE value="101">  
			
				<SWITCH cmd="OPEN_DLG" param0="WSP_CHECKING_ERROR_DEVICE_DATA">		
					
					<!-- Retry	-->	
					<CASE value="11"> <GOTO>WIRELESS_USB_WIFI_SETUP </GOTO> </CASE>
					
					<!-- go to select connection -->
					<DEFAULT> <GOTO>SELECT_CONNECT_TYPE</GOTO> </DEFAULT>
					
				</SWITCH>				
				
			</CASE>
			
			<!--  ERROR_WLAN_SUPPORT -->
			<CASE value="102">  				
				<COMMAND cmd="OPEN_DLG" param0="WSP_CHECKING_ERROR_WLAN_SUPPORT" /> 
				<GOTO>SELECT_CONNECT_TYPE</GOTO> 				
			</CASE>
			
			<!--  WSP_ERROR_CONNECTED_WIRED -->
			<CASE value="107">  				
				<COMMAND cmd="OPEN_DLG" param0="WSP_DISCONNECT_WIRED_NETWORK" /> 		
				<IF cmd="wsp_find_printer">
					<FALSE>	<COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE" /> </FALSE>
				</IF> 		
			</CASE>
						
		</SWITCH>
				
		
			
		
		<!-- 
		============================================================================================ 
				Show Wireless Network List 
		============================================================================================
		--> 
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="USB"/>
		
		<LABEL>WSP_CI3_FOUND_MODEL_STEP</LABEL> 
				
		<SWITCH cmd="open_dlg" param0="WSP_FOUND_MODEL" step_dlg="TRUE">
					 			
			<!--  200 : Advanced Setting --> 
			<CASE value="200"> 
				<IF cmd="check_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="WIFI" >
					<TRUE> <COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING_WIFI"/> </TRUE>
					<FALSE>
						<IF cmd="wsp_is_support_adhoc">
							<TRUE><COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING"/></TRUE>
							<FALSE> <COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING_WIFI"/> </FALSE> <!-- GUI -->
						</IF>
					</FALSE>
				</IF>
			</CASE>
			
			<!--  103 : Set Security Key --> 
			<CASE value="103"> 
				<COMMAND cmd="open_dlg" param0="WSP_SECURITY_KEY" step_dlg="TRUE"/> 
				<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO>
			</CASE>
	
		</SWITCH>


			
		
		
		<!-- 
		========================================================================================= 
				Setting Confirm Dialog
		=========================================================================================					
		--> 
		<LABEL>WSP_CI3_WIRELESS_CONFIRM_STEP</LABEL> 
		<SWITCH cmd="open_dlg" param0="WSP_SETTING_CONFIRM" param1="WSP_CONFIRM" step_dlg="TRUE">
			<CASE value="300">
				<!--  300 : Change Network --> 
				<COMMAND cmd="open_dlg" param0="WSP_SET_NET_PROTOCOL" /> 
				<GOTO>WSP_CI3_WIRELESS_CONFIRM_STEP</GOTO> 
			</CASE>						
		</SWITCH>



		<!-- 
		========================================================================================= 
				Connecting Dialog
		=========================================================================================					
		--> 
		
				
		<LABEL>WSP_CI3_WIRELESS_CONNECTING_STEP</LABEL> 
		
		
		<IF cmd="check_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="USB" >
			<TRUE>
				<IF cmd="wsp_find_printer">
					<FALSE>	<COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE" /> </FALSE>
				</IF> 
			</TRUE>
		</IF>
		
		
		<LABEL>WSP_CI3_WIRELESS_WIFI_CONNECTING_STEP</LABEL> 
		
		<IF cmd="check_variable" param0="VAL.WIRELESS_METHOD" param1="YES">
			<TRUE><COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT_NETWORK"/></TRUE>
			<FALSE><COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT"/></FALSE>
		</IF>
					
		<SWITCH cmd="open_dlg" param0="WSP_WIRELESS_CONNECTING" param1="#VAL.CONNECTING_PARAM#">
			<!--  101 : WSP_ERROR_DEVICE_DATA WSP_CHECKING_ERROR_DEVICE_DATA --> 
			<CASE value="101"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="1"/> </CASE>
		
			<!--  104 : WSP_ERROR_SSID -->
			<CASE value="104"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1=""/>	</CASE>
			 
			<!--  105 : WSP_ERROR_SECURITY --> 
			<CASE value="105"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="3"/>	</CASE>
			
			<!--  106 : WSP_ERROR_PC_CONNECTION_ERROR -->
			<CASE value="106"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="2"/>	</CASE>

			<!--  107 : WSP_ERROR_CONNECTED_WIRED -->
			<CASE value="107"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="4"/>	</CASE>
			
			<!--  108 : WSP_ERROR_IP_NOT_ALLOCATED -->
			<CASE value="108"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="5"/>	</CASE>
			
			<!--  109 : WSP_ERROR_GENERAL_WIRELESS -->
			<CASE value="109"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="6"/>	</CASE>
			
									
			<!-- Success -->
			<CASE value="0">  				
				<GOTO>WIRELESS_SETTING_SUCCESS</GOTO>	
			</CASE>
			
			<!--  109 : WSP_ERROR_GENERAL_WIRELESS -->
			<DEFAULT><COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="6"/></DEFAULT>
			
		</SWITCH>
				
		<COMMAND cmd="open_dlg" param0="WSP_CONNECTING_FAILURE#VAR.INT.FAIL_NUM#" />
		
		<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO>
		
		
		<!-- 
		===================================================================
		Wireless Setting Completed
		===================================================================
		-->
		<LABEL>WIRELESS_SETTING_SUCCESS</LABEL>
		
		<IF cmd="check_variable" param0="VAL.WIRELESS_METHOD" param1="YES">
			<TRUE>
			<!--
				Wireless Wi-Fi Setup Completed
			-->
				<COMMAND cmd="open_dlg" param0="WSP_SETTING_COMPLETE_WIRELESS"/>
			</TRUE>
			
			<FALSE>			
			<!--
				USB Completed
			-->
				<IF cmd="wsp_is_wifi_direct">
					<TRUE> <COMMAND cmd="open_dlg" param0="WSP_WIFI_DIRECT"/> </TRUE>
				</IF>	

				<!--<COMMAND cmd="open_dlg" param0="WSP_SETTING_COMPLETE"/>-->
				<COMMAND cmd="open_dlg" param0="WSP_SETTING_COMPLETE_WIRELESS_WITH_INFO"/>
				
			</FALSE>	
		</IF>
		
			
		 	
		

		<GOTO>SELECT_SOFTWARE_STEP</GOTO>
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		<!-- 
			*
			*
			*	Set IP Address
			*
			*
		 -->
		<LABEL>SET_IP_CONNECTION</LABEL>
		
		<SWITCH cmd="OPEN_DLG" param0="SEARCHING" param1="SETIP">
			
			<!-- Not found -->
			<CASE value="0">  
				
				<!-- Show Not found dialog -->
				<COMMAND cmd="open_dlg" param0="MODEL_NOT_FOUND_SETIP" step_dlg="FALSE"/>
				
				<!-- Show Firewall Notice -->
				<COMMAND cmd="OPEN_DLG" param0="FIREWALL_NOTICE" step_dlg="FALSE" />
				
				<GOTO>SET_IP_CONNECTION</GOTO> 
				
			</CASE>
			
			<!-- found -->
			<DEFAULT>
				
				<!-- Set IP Dialog -->
				<SWITCH cmd="OPEN_DLG" param0="SETIP_DLG" step_dlg="TRUE">
					
					<!-- Search Again-->
					<CASE value="11"> 	
						
						<!-- Show Firewall Notice -->
						<COMMAND cmd="OPEN_DLG" param0="FIREWALL_NOTICE" step_dlg="FALSE" />
						
						<GOTO>SET_IP_CONNECTION</GOTO> 
						
					</CASE>		
					
					<!-- Found-->
					<DEFAULT value="1">	
						<COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="FOUND_MODEL_SHOW_ONE"/>
						<GOTO>SELECT_SOFTWARE_STEP</GOTO>
					</DEFAULT>
						
				</SWITCH>		
				
			</DEFAULT>
			
		</SWITCH>

		
		
		
		
		
		
		
		
		
		
		
		
		
		<!-- 
			*
			*
			*	No Connection
			*
			*
		 -->
		<LABEL>NO_CONNECTION</LABEL>
		<GOTO>SELECT_SOFTWARE_STEP</GOTO>
	
	
	
	
	
		
		
		
		
		
		<!-- 
			*
			*
			* Select Printer
			*
			*
			-->
		<LABEL>PRINTER_FOUND_STEP</LABEL>

		<IF cmd="check_variable" param0="VAL.CONNECTION_DIALOG" param1="NOT_DEFINE">
			<TRUE> <COMMAND cmd="set_variable" param0="VAL.CONNECTION_DIALOG" param1="FOUND_MODEL_LIST"/> </TRUE>
		</IF>		
		
		<SWITCH cmd="open_dlg" param0="#VAL.CONNECTION_DIALOG#" param1="#VAL.CONNECTION_TYPE#" step_dlg="TRUE">
		
			<!-- Search Again (Network)-->
			<CASE value="11">  
								
				<COMMAND cmd="OPEN_DLG" param0="FIREWALL_NOTICE" step_dlg="FALSE"/>
			
				<GOTO>SEARCH_NETWORK</GOTO>
				
			</CASE>
			
			
			<!-- Direct Input -->	
			<CASE value="12"> <GOTO>DIRECT_INPUT_STEP</GOTO> </CASE>
			
			
			<!-- Select Another Printer -->		
			<CASE value="13"> <GOTO>SELECT_CONNECT_TYPE</GOTO> </CASE>	
			
			
			<!-- Wireless Setting -->	
			<CASE value="20"> <GOTO>WIRELESS_CONNECTION</GOTO> </CASE>	
	
	
			<!-- Wireless Setting : Other printer -->	
			<CASE value="100"> <GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO> </CASE>	
		</SWITCH>
		
	
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		<!-- 
			*
			*
			* Select Software
			*
			*
			-->					
			
		<LABEL>SELECT_SOFTWARE_STEP</LABEL>
		
		<!--<COMMAND cmd="wsp_restore_turnoff_networkwindow" />-->
			
		<!-- History Panel Section Setting -->
		<COMMAND cmd="set_history_section" param0="SELECT_FEATURES" step_dlg="TRUE"/>
		

		<IF cmd="check_option" param0="upload_ampv" param1="TRUE">
			<TRUE>
				<COMMAND cmd="open_dlg" param0="CHECK_UPDATES_DLG" step_dlg="FALSE"/>
				
				<IF cmd="open_dlg" param0="SELECT_SW_AMPV_UPLOAD" param1="INSTALL" dwparam="1" step_dlg="TRUE"> 
					<TRUE>
						<COMMAND cmd="open_dlg" param0="SU_AUTO_DLG" step_dlg="FALSE"/>
					</TRUE>
				</IF>
			</TRUE>
			<FALSE>
				<IF cmd="check_option" param0="smartupdate" param1="TRUE" >
					<TRUE> 
						<IF cmd="open_dlg" param0="SELECT_SW" param1="INSTALL" step_dlg="TRUE"> 
							<TRUE>
								<COMMAND cmd="open_dlg" param0="SU_AUTO_DLG" step_dlg="FALSE"/>
							</TRUE>
						</IF>
					</TRUE>
					<FALSE> <COMMAND cmd="open_dlg" param0="SELECT_SW_NO_SMARTUPDATE" param1="INSTALL" step_dlg="TRUE"/> </FALSE>
				</IF>
			</FALSE>
		</IF>

		
		<!-- Set Printer Settings -->
		<!--
		<IF cmd="is_printer_selected">
			<TRUE> <COMMAND cmd="open_dlg" param0="SET_PRINTER_SETTING" param1="MAIN"  step_dlg="TRUE"/> </TRUE>
		</IF>
		-->
		







		
		
		
		
		
		
		
		<!-- 
			*
			*
			* Smart Update Step
			*
			*
		<LABEL>SMART_UPDATE_STEP</LABEL>
		
		<IF cmd="check_option" param0="smartupdate" param1="TRUE" >
			<TRUE>		
				
				<COMMAND cmd="set_history_section" param0="SMART_UPDATE" step_dlg="TRUE"/>	
								
				
				<IF cmd="OPEN_DLG" param0="SU_CONFIRM_DLG" dwparam="1" step_dlg="TRUE">
				
				
					<TRUE> <COMMAND cmd="open_dlg" param0="SU_AUTO_DLG" step_dlg="FALSE"/> </TRUE>										
				</IF>
			</TRUE>			
		</IF>
		-->
	
		<!-- Write Item Info again ??? -->	
		<COMMAND cmd="WRITE_ITEM_INFO" param0="CUSTOM"/>
		
	
	
	
	
	
	
	
		
		
		<!-- 
			*
			*
			* Erp ????
			*
			* if the speed is over than 45 ppm for mono printer, ERP should be shown with duplex option
			* else, show erp notice only.
		-->
		<IF cmd="check_option" param0="erp" param1="FALSE">
			<FALSE>						
				<IF cmd="is_erp_country">
					<TRUE>
						<IF cmd="is_printer_selected">
							<TRUE>
								<COMMAND cmd="open_dlg" param0="ERP_NOTICE" step_dlg="TRUE"/>	
							</TRUE>
							<FALSE>
								<COMMAND cmd="open_dlg" param0="ERP_NOTICE_NO_PRINTER" step_dlg="TRUE"/>	
							</FALSE>
						</IF>
					</TRUE>
				</IF>
			</FALSE>
		</IF>
				
					
		
		
		
		
		
		
		
		
		<!-- 
			*
			*
			* Copying Files
			*
			*
			-->
				
		
		<!-- History Panel Section Setting -->
		<COMMAND cmd="set_history_section" param0="INSTALLATION" step_dlg="TRUE"/>
		
		
		<!-- Show Copy File Dialog-->
		<COMMAND cmd="open_dlg" param0="COPY_FILE"/>
		
		
		
		
		<!-- 
			*
			* Installing Step
			*
			-->	
		
		
		<IF cmd="check_option" param0="install_vc" param1="TRUE">
			<TRUE> <COMMAND cmd="open_dlg" param0="INSTALL" param1="WAIT_INSTALL_VC" /> </TRUE>
			<FALSE> <COMMAND cmd="open_dlg" param0="INSTALL" /> </FALSE>
		</IF>		
		
		
	<!--	<IF cmd="check_option" param0="install_vc" param1="TRUE">
			<TRUE> <COMMAND cmd="open_dlg" param0="INSTALL_ADV" param1="WAIT_INSTALL_VC" /> </TRUE>
			<FALSE> <COMMAND cmd="open_dlg" param0="INSTALL_ADV" /> </FALSE>
		</IF> -->
		
		
		
		<!-- 
			*
			* Create Total Uninstaller shortcut
			*
		-->	
		<COMMAND cmd="create_shortcut" param0="TOTAL_UNINSTALL_SHORTCUT_MUI" />
		
		
		
		
		<COMMAND cmd="restore_search_update"/>
		
		
		<!-- Delete old AMPV agree -->
		<COMMAND cmd="add_reg" param0="WEB_AGREE_FALSE" />		
		<COMMAND cmd="add_reg" param0="WEB_AGREE_FALSE_64" />		
		<COMMAND cmd="delete_reg" param0="WEB_AGREE_FALSE" />
		<COMMAND cmd="delete_reg" param0="WEB_AGREE_FALSE_64" />	
		<COMMAND cmd="add_reg" param0="WSP_PSU_KEY" />		<!--For EPM WSP Wizard-->

		
		
		
		
		
		
		
		
		
		
		<!-- 
			*
			*
			* Finish Dialog
			*
			*
			-->
		<COMMAND cmd="set_history_section" param0="FINISH" step_dlg="TRUE"/>
		
		<COMMAND cmd="set_variable" param0="VAL.TEST_PAGE" param1=""/>
		<COMMAND cmd="set_variable" param0="VAL.SM_ENABLE" param1=""/>
		<COMMAND cmd="set_variable" param0="VAL.EED" param1=""/>
		<COMMAND cmd="copy_file" param0="INSTALL_COPY_FILE_INFO/DEVMONDLL_WIN32"/>
  		<COMMAND cmd="copy_file" param0="INSTALL_COPY_FILE_INFO/DEVMONDLL_WIN64"/>
		
		<IF cmd="is_printer_installed" operator="AND" cmd_1="is_connected">			
			<TRUE>	
				<COMMAND cmd="set_variable" param0="VAL.TEST_PAGE" param1="TEST_PAGE"/> 
				
				<COMMAND cmd="diagnosis" />
				
				<IF cmd="check_option" param0="sm_enable" param1="TRUE">
					<TRUE><COMMAND cmd="set_variable" param0="VAL.SM_ENABLE" param1="SM_ENABLE"/></TRUE>
					<FALSE><COMMAND cmd="set_variable" param0="VAL.SM_ENABLE" param1=""/></FALSE>
				</IF>
				
				<IF cmd="check_option" param0="eed" param1="TRUE">
					<TRUE><COMMAND cmd="set_variable" param0="VAL.EED" param1="EED"/></TRUE>
					<FALSE><COMMAND cmd="set_variable" param0="VAL.EED" param1=""/></FALSE>
				</IF>
				
			</TRUE>
			<FALSE>	
				<COMMAND cmd="set_variable" param0="VAL.TEST_PAGE" param1=""/> 
				
				<IF cmd="is_printer_installed">
					<TRUE>
						<IF cmd="check_option" param0="sm_enable" param1="TRUE">
							<TRUE><COMMAND cmd="set_variable" param0="VAL.SM_ENABLE" param1="SM_ENABLE"/></TRUE>
							<FALSE><COMMAND cmd="set_variable" param0="VAL.SM_ENABLE" param1=""/></FALSE>
						</IF>
						
						<IF cmd="check_option" param0="eed" param1="TRUE">
							<TRUE><COMMAND cmd="set_variable" param0="VAL.EED" param1="EED"/></TRUE>
							<FALSE><COMMAND cmd="set_variable" param0="VAL.EED" param1=""/></FALSE>
						</IF>
					</TRUE>
				</IF>
			</FALSE>
		</IF>

			
		<COMMAND cmd="set_variable" param0="VAL.SET_ALTITUDE" param1="FALSE"/>	
		
		<IF cmd="check_option" param0="set_alti" param1="TRUE">
			<TRUE>
				<SWITCH cmd="check_altitude"> <!-- Check Set_alti option and country -->
					<!-- High Altitude -->
					<CASE value="1"><COMMAND cmd="set_variable" param0="VAL.SET_ALTITUDE" param1="TRUE"/> </CASE>
					
					<!-- Higher Altitude -->
					<CASE value="2"><COMMAND cmd="set_variable" param0="VAL.SET_ALTITUDE" param1="TRUE"/> </CASE>
					
					<!-- Highest Altitude -->
					<CASE value="3"><COMMAND cmd="set_variable" param0="VAL.SET_ALTITUDE" param1="TRUE"/> </CASE>
				</SWITCH>
			</TRUE>
		</IF>
		

		<IF cmd="check_file" param0="$DEST_INST_DIR$\MANUAL\__MODEL__\$MANUAL_LANG_DIR$\start_here.htm" >
			<TRUE>
				<COMMAND cmd="create_shortcut" param0="MANUAL_VIEWER_SHORTCUT" />
				<COMMAND cmd="create_shortcut" param0="MANUAL_VIEWER_SHORTCUT_MUI" />
				<COMMAND cmd="execute_file" param0="$INST_SRC_DIR$\bin\ViewUserGuide.exe" param1="/install /n __MFG__"/>
																
				<IF cmd="check_variable" param0="VAL.SET_ALTITUDE" param1="TRUE" operator="AND" cmd_1="check_variable" param0_1="VAL.TEST_PAGE" param1_1="TEST_PAGE">
					<TRUE><COMMAND cmd="open_dlg" param0="FINISH_MANUAL_ALTI" param1="TEST_PAGE,ALTITUDE,#VAL.SM_ENABLE#,#VAL.EED#"/></TRUE>
					<FALSE><COMMAND cmd="open_dlg" param0="FINISH_MANUAL" param1="#VAL.TEST_PAGE#,#VAL.SM_ENABLE#,#VAL.EED#"/></FALSE>
				</IF>
			</TRUE>
			<FALSE>
				<IF cmd="check_variable" param0="VAL.SET_ALTITUDE" param1="TRUE" operator="AND" cmd_1="check_variable" param0_1="VAL.TEST_PAGE" param1_1="TEST_PAGE">
					<TRUE><COMMAND cmd="open_dlg" param0="FINISH_ALTI" param1="TEST_PAGE,ALTITUDE,#VAL.SM_ENABLE#,#VAL.EED#"/></TRUE>
					<FALSE><COMMAND cmd="open_dlg" param0="FINISH" param1="#VAL.TEST_PAGE#,#VAL.SM_ENABLE#,#VAL.EED#"/></FALSE>	
				</IF>
			</FALSE>			
		</IF>
		
	<!-- 
		<COMMAND cmd="open_dlg" param0="FINISH_MANUAL_EED" param1="TEST_PAGE,EED"/>
	-->




		<!-- 
			*
			*
			* Smart update Finish
			*
			*
			-->
		<IF cmd="check_option" param0="smartupdate" param1="TRUE" >
			<TRUE>
				<IF cmd="is_connected">
					<TRUE>
						<IF cmd="is_there_fw_update">
							<TRUE>
								<COMMAND cmd="call_fw_update" />
							</TRUE>
						</IF>
					</TRUE>
				</IF>
		
				<COMMAND cmd="restore_max_connection" />
								
				<COMMAND cmd="delete_su_download_files" />
			</TRUE>
		</IF>	
		
				
		<!-- Duplex option is set again -->
		<IF cmd="check_option" param0="duplex" param1="TRUE">
			<TRUE>	<COMMAND cmd="set_duplex_option" />	</TRUE>
		</IF>

			
		<!--
			*
			*
			*	END of Installation
			*	
			*
			-->
    <IF cmd="check_option" param0="dotnetInstall" param1="TRUE">
        <IF cmd ="is_component_installing" param0="EPM">
          <TRUE>
            <COMMAND cmd="execute_file" param0="__EPM2_DOTNET_HANDLER_EXE__" param1="__EPM2_DOTNET_HANDLER_PARAM__"/>
          </TRUE>
        </IF>
    </IF>
  
		<COMMAND cmd="execute_file" param0="__SCAN_ID_EXE__" param1="__EPM_PARAM__"/>
		<COMMAND cmd="terminate"/>	
	
		
	</INSTALL>




	<!--
	*
	*
	*	Maintenance
	*
	*
	-->
	<MAINTENANCE>
	
	<!--	
	=============   Remove  =============   
	-->
		<COMMAND cmd="set_setup_type" param0="UNINSTALL" />
		
		<COMMAND cmd="set_history" param0="REMOVE"/>
		
		<COMMAND cmd="set_history_section" param0="SELECT_FEATURES" step_dlg="TRUE"/>
		
		<COMMAND cmd="open_dlg" param0="REMOVE_SELECT_FEATURES" param1="REMOVE"/> 

		<COMMAND cmd="set_history_section" param0="UNINSTALL" step_dlg="TRUE"/>
		
		<COMMAND cmd="open_dlg" param0="REMOVE_INSTALL" param1="REMOVE"/> 

		<COMMAND cmd="set_history_section" param0="FINISH" step_dlg="TRUE"/>
		
		<COMMAND cmd="open_dlg" param0="REMOVE_FINISH"/>
				
		<COMMAND cmd="terminate"/>
			
					
	</MAINTENANCE>




	<!--
	
		Called from WSP_Start() function of sswsp.dll by Common Installer 2 
		
	-->	

	<WSP_FLOW_CI2>
	</WSP_FLOW_CI2>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<!-- 
		
		Called from WSP_Start() function of sswsp.dll and Wireless Setting Proram Shortcut (sswsp.exe) 
		
		-->
	
	<WSP_FLOW_PSU>
	
		<!-- 
			*
			*
			*	Wireless Setup Step
			*
			*
		-->
		
		
		<!-- 
		=============================================================================== 
				Check Local Connection 
		===================================================================================
		--> 	
		

		<IF cmd="wsp_is_intro_dontshow">
			<FALSE>	<COMMAND cmd="open_dlg" param0="WSP_INTRO" step_dlg="TRUE"/> </FALSE>
		</IF>

		
		
		<COMMAND cmd="wsp_initialize" />

		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_METHOD" param1="NO"/>
		<COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT"/>
		<COMMAND cmd="set_variable" param0="VAL.WLAN_AVAILABLE" param1="NOT_DEFINE"/>

		<COMMAND cmd="open_dlg" param0="WSP_GUIDE_PRINTER_TURN_ON_PSU" step_dlg="TRUE" />
		
		<!--       
		================================================================
		Searching wireless printer -> If no printer, select wireless setting method : USB or wi-fi
		================================================================
		-->		
		
		<LABEL>SELECT_WIRELESS_SETTING_METHOD</LABEL>
		
		<IF cmd="check_option" param0="wws" param1="FALSE">
			<TRUE><COMMAND cmd="set_variable" param0="VAL.WLAN_AVAILABLE" param1="WLAN_NOT_SUPPORT"/></TRUE>
			<FALSE>
				<IF cmd="wsp_is_wlan_available" >
					<TRUE><COMMAND cmd="set_variable" param0="VAL.WLAN_AVAILABLE" param1="WLAN_SUPPORT"/></TRUE>
					<FALSE><COMMAND cmd="set_variable" param0="VAL.WLAN_AVAILABLE" param1="WLAN_NOT_SUPPORT"/></FALSE>
				</IF>
			</FALSE>
		</IF>
		
		
		<SWITCH cmd="open_dlg" param0="WSP_SELECT_WIRELESS_SETTING_METHOD" param1="#VAL.WLAN_AVAILABLE#" step_dlg="TRUE">
			<CASE value="0"> <GOTO>WIRELESS_WIRELESS_WIFI_SETUP</GOTO> </CASE>					
			<CASE value="1"> <GOTO>WIRELESS_USB_WIFI_SETUP</GOTO> </CASE>				
		</SWITCH>

		
		
		<!--       
		================================================================
		Connect Printer Soft AP with Found SSID and the Network Key
		================================================================
		-->	
		<LABEL>WIRELESS_WIRELESS_WIFI_SETUP</LABEL>
		
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_METHOD" param1="YES"/>
		
		<COMMAND cmd="wsp_turnoff_networkwindow" />			
		
		<LABEL>WIRELESS_WIRELESS_DEVICE_CHECKING</LABEL>
		<COMMAND cmd="set_variable" param0="VAL.IGNORE_SSID" param1="FALSE"/>
		<COMMAND cmd="set_variable" param0="VAL.IGNORE_NETWORK_KEY" param1="FALSE"/>
		
		<SWITCH cmd="OPEN_DLG" param0="WSP_DEVICE_CHECKING_NETWORK" param1="WSP_CHECK_NETWORK">
		
			<!--  ERROR_DEVICE_DATA 
			<CASE value="101">  
				<SWITCH cmd="OPEN_DLG" param0="WSP_CHECKING_ERROR_DEVICE_DATA">		
					
					<CASE value="11"> <GOTO>WIRELESS_WIRELESS_DEVICE_CHECKING </GOTO> </CASE>
										
					<DEFAULT> <GOTO>SELECT_CONNECT_TYPE</GOTO> </DEFAULT>
				</SWITCH>
			</CASE>
			-->
			
			<!--  WSP_ERROR_CONNECTED_WIRED 
			<CASE value="107">  		
				<COMMAND cmd="OPEN_DLG" param0="WSP_DISCONNECT_WIRED_NETWORK" /> 
				<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO> 		 				
			</CASE>
			-->
			
			<!-- WSP_ERROR_INVALID_PROFILE 
				: Success to retrieve Wireless Data from the connected printer but PC profile is not available -->
			<CASE value="202"> 		
				<COMMAND cmd="set_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="WIFI"/>
				<!-- <GOTO>WSP_CI3_FOUND_MODEL_STEP</GOTO> 	-->
			</CASE>
			
			<!-- WSP_CURRENT_SET_PROFILE 
				: Success to retrieve Wireless Data from the connected printer and PC profile is available -->
			<CASE value="201"> 	
				<COMMAND cmd="set_variable" param0="VAL.IGNORE_SSID" param1="TRUE"/>
				<COMMAND cmd="set_variable" param0="VAL.IGNORE_NETWORK_KEY" param1="TRUE"/>	
				<!-- <GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO> 		--> 
			</CASE>

			<!-- WSP_ONLY_PASSWORD_NEEDED 
				: Success to retrieve Wireless Data from the connected printer and only SSID is available -->
			<CASE value="203"> 		
				<COMMAND cmd="set_variable" param0="VAL.IGNORE_SSID" param1="TRUE"/>
				<!-- <COMMAND cmd="open_dlg" param0="WSP_SECURITY_KEY" step_dlg="TRUE"/>
				<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO> 	-->	 
			</CASE>
						
					
			<!-- Wireless setting error : Go to wireless setting through USB connection-->
			<CASE value="122">  				
				<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>	
			</CASE>
			
			<!-- Connect Error : Printer does not support wireless wifi setup -->	
			<!-- <DEFAULT> <GOTO>WIRELESS_USB_WIFI_SETUP</GOTO> </DEFAULT> -->
			<DEFAULT>  <!-- WSP_ERROR_SOFTAP_NOT_FOUND : 110 -->
				<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO> 		 
			</DEFAULT>
		</SWITCH>
		
		<!--
		
			Open WSP Confirm Dialog
		
		-->
		
		<IF cmd="wsp_is_confirm_needed">
			<TRUE>
				<LABEL>WSP_CI3_PUSH_WPS_STEP</LABEL>		
				<SWITCH cmd="OPEN_DLG" param0="WSP_PUSH_WPS" > 
					
					<CASE value="3"> <!-- Time Out -->
						<SWITCH cmd="OPEN_DLG" param0="WSP_PUSH_WPS_RETRY" > 
							<CASE value="100"> <!-- Retry -->
								<GOTO>WSP_CI3_PUSH_WPS_STEP</GOTO>
							</CASE>
						</SWITCH>
					</CASE>
					
					<CASE value="1"> <!-- not started -->
						<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>
					</CASE>
					
					<CASE value="2"> <!-- not started -->
						<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>
					</CASE>
					
				</SWITCH>
			</TRUE>
		</IF>
		
		<!--
		
			Open Disconnect Wired cable Dialog
		
		-->
		<IF cmd="wsp_is_wired_connected">
			<TRUE><COMMAND cmd="OPEN_DLG" param0="WSP_DISCONNECT_WIRED_NETWORK" /></TRUE>
		</IF>
		
		
		<!--
		
			Open Select SSID Dialog
		
		-->
		<IF cmd="check_variable" param0="VAL.IGNORE_SSID" param1="FALSE">
			<TRUE><COMMAND cmd="open_dlg" param0="WSP_FOUND_MODEL_WWS" step_dlg="TRUE"/></TRUE>
		</IF>
		
		
		<!--
		
			Open Set Network Key Dialog
		
		-->
		<IF cmd="check_variable" param0="VAL.IGNORE_NETWORK_KEY" param1="FALSE">
			<TRUE><COMMAND cmd="open_dlg" param0="WSP_SECURITY_KEY" step_dlg="TRUE"/> </TRUE>
		</IF>
		
		
		<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO>
		
		
		
		
		
		
		<!--       
		================================================================
		Connect Printer through USB
		================================================================
		-->	
		<LABEL>WIRELESS_USB_WIFI_SETUP</LABEL>
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_METHOD" param1="NO"/>

		
		<IF cmd="wsp_find_printer" >
			<FALSE><COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE" /></FALSE>
		</IF>
		
		

		<!--       
		================================================================
		Load Current Device Settings and Wireless Network List       
		================================================================
		-->	
		<LABEL>WIRELESS_CI3_CHECKING_DEVICE</LABEL>
		
		<SWITCH cmd="OPEN_DLG" param0="WSP_DEVICE_CHECKING" param1="WSP_CHECK">
		
			<!--  ERROR_DEVICE_DATA -->
			<CASE value="101">  
			
				<SWITCH cmd="OPEN_DLG" param0="WSP_CHECKING_ERROR_DEVICE_DATA">		
					
					<!-- Retry	-->	
					<CASE value="11"> <GOTO>WIRELESS_USB_WIFI_SETUP </GOTO> </CASE>
					
					<!-- go to select connection -->
					<DEFAULT> <GOTO>WSP_PSU_WIRELESS_CANCEL</GOTO> </DEFAULT>
					
				</SWITCH>				
				
			</CASE>
			
			<!--  ERROR_WLAN_SUPPORT -->
			<CASE value="102">  				
				<COMMAND cmd="OPEN_DLG" param0="WSP_CHECKING_ERROR_WLAN_SUPPORT" /> 
				<GOTO>WSP_PSU_WIRELESS_CANCEL</GOTO> 				
			</CASE>
			
			<!--  WSP_ERROR_CONNECTED_WIRED -->
			<CASE value="107">  				
				<COMMAND cmd="OPEN_DLG" param0="WSP_DISCONNECT_WIRED_NETWORK" /> 		
				<IF cmd="wsp_find_printer">
					<FALSE>	<COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE" /> </FALSE>
				</IF> 		
			</CASE>
						
		</SWITCH>
				
		
			
		
		<!-- 
		============================================================================================ 
				Show Wireless Network List 
		============================================================================================
		--> 
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="USB"/>
		
		<LABEL>WSP_CI3_FOUND_MODEL_STEP</LABEL> 
		<SWITCH cmd="open_dlg" param0="WSP_FOUND_MODEL" step_dlg="TRUE">
					 			
			<!--  200 : Advanced Setting --> 
			<CASE value="200"> 
				<IF cmd="check_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="WIFI" >
					<TRUE> <COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING_WIFI"/> </TRUE>
					<FALSE>
						<IF cmd="wsp_is_support_adhoc">
							<TRUE><COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING"/></TRUE>
							<FALSE> <COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING_WIFI"/> </FALSE> <!-- GUI -->
						</IF>
					</FALSE>
				</IF>
			</CASE>
			
			<!--  103 : Set Security Key --> 
			<CASE value="103"> 
				<COMMAND cmd="open_dlg" param0="WSP_SECURITY_KEY" step_dlg="TRUE"/> 
				<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO>
			</CASE>
	
		</SWITCH>


			
		
		
		<!-- 
		========================================================================================= 
				Setting Confirm Dialog
		=========================================================================================					
		--> 
		<LABEL>WSP_CI3_WIRELESS_CONFIRM_STEP</LABEL> 
		<SWITCH cmd="open_dlg" param0="WSP_SETTING_CONFIRM" param1="WSP_CONFIRM" step_dlg="TRUE">
			<CASE value="300">
				<!--  300 : Change Network --> 
				<COMMAND cmd="open_dlg" param0="WSP_SET_NET_PROTOCOL" /> 
				<GOTO>WSP_CI3_WIRELESS_CONFIRM_STEP</GOTO> 
			</CASE>						
		</SWITCH>



		<!-- 
		========================================================================================= 
				Connecting Dialog
		=========================================================================================					
		--> 
		
		<LABEL>WSP_CI3_WIRELESS_CONNECTING_STEP</LABEL> 
	
		<IF cmd="check_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="USB" >
			<TRUE>
				<IF cmd="wsp_find_printer">
					<FALSE>	<COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE" /> </FALSE>
				</IF> 
			</TRUE>
		</IF>
		
		<LABEL>WSP_CI3_WIRELESS_WIFI_CONNECTING_STEP</LABEL> 
		
		<IF cmd="check_variable" param0="VAL.WIRELESS_METHOD" param1="YES">
			<TRUE><COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT_NETWORK"/></TRUE>
			<FALSE><COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT"/></FALSE>
		</IF>
		<COMMAND cmd="set_variable" param0="VAR.SAME_NETWORK" param1="NO"/>
					
		<SWITCH cmd="open_dlg" param0="WSP_WIRELESS_CONNECTING" param1="#VAL.CONNECTING_PARAM#">
			<!--  101 : WSP_ERROR_DEVICE_DATA WSP_CHECKING_ERROR_DEVICE_DATA --> 
			<CASE value="101"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="1"/> </CASE>
		
			<!--  104 : WSP_ERROR_SSID -->
			<CASE value="104"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1=""/>	</CASE>
			 
			<!--  105 : WSP_ERROR_SECURITY --> 
			<CASE value="105"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="3"/>	</CASE>
			
			<!--  106 : WSP_ERROR_PC_CONNECTION_ERROR -->
			<CASE value="106">
				<COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="2"/>
				<COMMAND cmd="set_variable" param0="VAR.SAME_NETWORK" param1="NO"/>
			</CASE>

			<!--  107 : WSP_ERROR_CONNECTED_WIRED -->
			<CASE value="107"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="4"/>	</CASE>
			
			<!--  108 : WSP_ERROR_IP_NOT_ALLOCATED -->
			<CASE value="108"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="5"/>	</CASE>
			
			<!--  109 : WSP_ERROR_GENERAL_WIRELESS -->
			<CASE value="109"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="6"/>	</CASE>
			
			<CASE value="122">  				
				<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>	
			</CASE>
						
			<!-- Success -->
			<CASE value="0"> 
				<COMMAND cmd="set_variable" param0="VAR.SAME_NETWORK" param1="YES"/>
				<GOTO>WIRELESS_SETTING_SUCCESS</GOTO>	
			</CASE>
			
			
			<DEFAULT><GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO></DEFAULT>
			
		</SWITCH>
		
	
		
		<!--
		====================================================================================================================
			Show Error Dialog
		====================================================================================================================
		-->
		<!--
		<IF cmd="check_variable" param0="VAL.WIRELESS_METHOD" param1="YES">
			<TRUE>			
				<SWITCH cmd="open_dlg" param0="WSP_CONNECTING_FAILURE#VAR.INT.FAIL_NUM#" >
					<CASE value="100"> <GOTO>WIRELESS_USB_WIFI_SETUP</GOTO></CASE>
				</SWITCH>
			</TRUE>
			<FALSE>			
				<COMMAND cmd="open_dlg" param0="WSP_CONNECTING_FAILURE#VAR.INT.FAIL_NUM#" />
			</FALSE>
		</IF>
		-->
		
		<IF cmd="check_variable" param0="VAR.INT.FAIL_NUM" param1="2">
			<FALSE> <COMMAND cmd="open_dlg" param0="WSP_CONNECTING_FAILURE#VAR.INT.FAIL_NUM#" /></FALSE>
			<TRUE> <GOTO>WIRELESS_SETTING_SUCCESS</GOTO></TRUE>
		</IF>
		
		
		
		<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO>
		
		
		<!-- 
		===================================================================
		Wireless Setting Completed
		===================================================================
		-->
			
				
		<LABEL>WIRELESS_SETTING_SUCCESS</LABEL>		
		<IF cmd="wsp_is_wifi_direct">
			<TRUE> <COMMAND cmd="open_dlg" param0="WSP_WIFI_DIRECT_PSU"/> </TRUE>
		</IF>
		
		<!--
		<IF cmd="check_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="USB">
			<TRUE> <COMMAND cmd="open_dlg" param0="WSP_COMPLETE_CHECK" /> </TRUE>
			<FALSE> <COMMAND cmd="open_dlg" param0="WSP_SETTING_COMPLETE_WIRELESS_PSU" /> </FALSE>
		</IF>
		-->
		<COMMAND cmd="open_dlg" param0="WSP_SETTING_COMPLETE_WIRELESS_WITH_INFO_PSU" step_dlg="TRUE"/>
		<LABEL>WIRELESS_SETTING_VALIDATION</LABEL>
		
		<!--"VAR.PORT.TYPE" is USB or Wireless -->
		<!--"VAR.FINISH.TYPE" is NORMAL or USB_ONLY -->
		<COMMAND cmd="set_variable" param0="VAR.PORT.TYPE" param1="USB" />
		<COMMAND cmd="set_variable" param0="VAR.FINISH.TYPE" param1="NORMAL" />
		
		<IF cmd="check_variable" param0="VAR.SAME_NETWORK" param1="YES">
			<TRUE>
				<IF cmd="wsp_find_printer" >
					<TRUE>
						<SWITCH cmd="open_dlg" param0="WSP_SELECT_PORT_USB_WIFI" param1="SELECT_SECOND" step_dlg="TRUE" >
							<!--USB-->
							<CASE value="0">
								<COMMAND cmd="set_variable" param0="VAR.PORT.TYPE" param1="USB" />
									<COMMAND cmd="wsp_set_port_value" param0="USB"/>
							</CASE>
							<!--Wireless-->
							<CASE value="1">
								<COMMAND cmd="set_variable" param0="VAR.PORT.TYPE" param1="WIRELESS" />
								<COMMAND cmd="wsp_set_port_value" param0="WIRELESS"/>
							</CASE>
						</SWITCH>
					</TRUE>
					<FALSE>
						<COMMAND cmd="set_variable" param0="VAR.PORT.TYPE" param1="WIRELESS" />
						<COMMAND cmd="wsp_set_port_value" param0="WIRELESS"/>
					</FALSE>
				</IF>
				<COMMAND cmd="set_variable" param0="VAR.FINISH.TYPE" param1="NORMAL" />
			</TRUE>
			<FALSE>
				<IF cmd="wsp_find_printer" >
					<TRUE>
						<COMMAND cmd="set_variable" param0="VAR.PORT.TYPE" param1="USB" />
						<COMMAND cmd="wsp_set_port_value" param0="USB"/>
						<COMMAND cmd="set_variable" param0="VAR.FINISH.TYPE" param1="USB_ONLY" />
					</TRUE>
					<FALSE>
						<COMMAND cmd="open_dlg" param0="WSP_FAIL_CHANGE_PORT" />
						<GOTO>WSP_PSU_WIRELESS_CANCEL</GOTO>
					</FALSE>
				</IF>
			</FALSE>
		</IF>
		
	
		<LABEL>WSP_CHECK_INSTALLED_PRINTER_NUM</LABEL>
		<SWITCH cmd="wsp_check_installed_printer_num" >
			<!-- no driver in PC -->
			<CASE value="0"><GOTO>WSP_DOWNLOAD_DRIVER</GOTO> </CASE>
			<!-- 1 driver in PC -->
			<CASE value="1"><GOTO>WSP_SET_PORT</GOTO> </CASE>
			<!--many driver in PC -->
			<DEFAULT>
				<COMMAND cmd="open_dlg" param0="WSP_SELECT_PRINTER_TO_CHANGE_PORT" />
			</DEFAULT>
		</SWITCH>
		<LABEL>WSP_CHECK_INSTALLED_PRINTER_NUM_END</LABEL>
		
		<LABEL>WSP_SET_PORT</LABEL>
		
		<COMMAND cmd="wsp_set_port" param0="#VAR.PORT.TYPE#"/>
			
		<GOTO>WSP_DOWNLOAD_DRIVER_END</GOTO>
		<LABEL>WSP_DOWNLOAD_DRIVER</LABEL>
			<COMMAND cmd="open_dlg" param0="WSP_NOTI_DOWNLAOD" />
			<SWITCH cmd="open_dlg" param0="WSP_DOWNLAOD_INSTALL" >
				<!--Fail to Downlaod and Install -->
				<CASE value="0"><COMMAND cmd="open_dlg" param0="WSP_DOWNLAOD_INSTALL_FAILURE" /></CASE>
				<DEFAULT><GOTO>WSP_CHANGE_PORT_COMPLETE</GOTO></DEFAULT>
			</SWITCH>
		<LABEL>WSP_DOWNLOAD_DRIVER_END</LABEL>
						
		<LABEL>WSP_CHANGE_PORT_COMPLETE</LABEL>
		<IF cmd="check_variable" param0="VAR.FINISH.TYPE" param1="NORMAL" >
			<TRUE><COMMAND cmd="open_dlg" param0="WSP_CHANGE_PORT_NORMAL" param1="#VAR.PORT.TYPE#" /></TRUE>
		</IF>
		<IF cmd="check_variable" param0="VAR.FINISH.TYPE" param1="USB_ONLY" >
			<TRUE><COMMAND cmd="open_dlg" param0="WSP_CHANGE_PORT_USB_ONLY" param1="#VAR.PORT.TYPE#" /></TRUE>
		</IF>
		
		

		
		
		
	
		
		<LABEL>WSP_PSU_WIRELESS_CANCEL</LABEL>		
		<COMMAND cmd="terminate" param0="IDCANCEL"/>
		
	</WSP_FLOW_PSU>
	
	
	
	
	
	
	
	
	
	<!-- 
		
		Called from WSP_StartEX() function of sswsp.dll 
		
		- Searching Device should be removed because EPM will pass the device information through parameters
		
		-->
	<WSP_FLOW_EPM>
	
		<!-- 
			*
			*
			*	Wireless Setup Step
			*
			*
		-->
		
		
		<!-- 
		=============================================================================== 
				Check Local Connection 
		===================================================================================
		--> 	
		
<!--
		<IF cmd="wsp_is_intro_dontshow">
			<FALSE>	<COMMAND cmd="open_dlg" param0="WSP_INTRO" step_dlg="TRUE"/> </FALSE>
		</IF>
-->
		
		
		<COMMAND cmd="wsp_initialize" />
				
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_METHOD" param1="NO"/>
		<COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT"/>
		<COMMAND cmd="set_variable" param0="VAL.WLAN_AVAILABLE" param1="NOT_DEFINE"/>

		<!--       
		================================================================
		Connect Printer through USB
		================================================================
		-->	
		<LABEL>WIRELESS_USB_WIFI_SETUP</LABEL>
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_METHOD" param1="NO"/>

		
		<IF cmd="wsp_check_printer" >
			<FALSE><COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE_PSU" /></FALSE>
		</IF>
		
		

		<!--       
		================================================================
		Load Current Device Settings and Wireless Network List       
		================================================================
		-->	
		<LABEL>WIRELESS_CI3_CHECKING_DEVICE</LABEL>
		
		<SWITCH cmd="OPEN_DLG" param0="WSP_DEVICE_CHECKING" param1="WSP_CHECK">
		
			<!--  ERROR_DEVICE_DATA -->
			<CASE value="101">  
			
				<SWITCH cmd="OPEN_DLG" param0="WSP_CHECKING_ERROR_DEVICE_DATA_PSU">		
					
					<!-- Retry	-->	
					<CASE value="11"> <GOTO>WIRELESS_USB_WIFI_SETUP </GOTO> </CASE>
					
					<!-- go to select connection -->
					<DEFAULT> <GOTO>WSP_PSU_WIRELESS_CANCEL</GOTO> </DEFAULT>
					
				</SWITCH>				
				
			</CASE>
			
			<!--  ERROR_WLAN_SUPPORT -->
			<CASE value="102">  				
				<COMMAND cmd="OPEN_DLG" param0="WSP_CHECKING_ERROR_WLAN_SUPPORT" /> 
				<GOTO>WSP_PSU_WIRELESS_CANCEL</GOTO> 				
			</CASE>
			
			<!--  WSP_ERROR_CONNECTED_WIRED -->
			<CASE value="107">  				
				<COMMAND cmd="OPEN_DLG" param0="WSP_DISCONNECT_WIRED_NETWORK_PSU" /> 		
				<IF cmd="wsp_check_printer">
					<FALSE>	<COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE_PSU" /> </FALSE>
				</IF> 		
			</CASE>
						
		</SWITCH>
				
		
			
		
		<!-- 
		============================================================================================ 
				Show Wireless Network List 
		============================================================================================
		--> 
		<COMMAND cmd="set_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="USB"/>
		
		<LABEL>WSP_CI3_FOUND_MODEL_STEP</LABEL> 
		<SWITCH cmd="open_dlg" param0="WSP_FOUND_MODEL_PSU" step_dlg="TRUE">
					 			
			<!--  200 : Advanced Setting --> 
			<CASE value="200"> 
				<IF cmd="check_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="WIFI" >
					<TRUE> <COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING_WIFI"/> </TRUE>
					<FALSE>
						<IF cmd="wsp_is_support_adhoc">
							<TRUE><COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING"/></TRUE>
							<FALSE> <COMMAND cmd="open_dlg" param0="WSP_ADVANCED_SETTING_WIFI"/> </FALSE> <!-- GUI -->
						</IF>
					</FALSE>
				</IF>
			</CASE>
			
			<!--  103 : Set Security Key --> 
			<CASE value="103"> 
				<COMMAND cmd="open_dlg" param0="WSP_SECURITY_KEY" step_dlg="TRUE"/> 
				<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO>
			</CASE>
	
		</SWITCH>


			
		
		
		<!-- 
		========================================================================================= 
				Setting Confirm Dialog
		=========================================================================================					
		--> 
		<LABEL>WSP_CI3_WIRELESS_CONFIRM_STEP</LABEL> 
		<SWITCH cmd="open_dlg" param0="WSP_SETTING_CONFIRM" param1="WSP_CONFIRM" step_dlg="TRUE">
			<CASE value="300">
				<!--  300 : Change Network --> 
				<COMMAND cmd="open_dlg" param0="WSP_SET_NET_PROTOCOL" /> 
				<GOTO>WSP_CI3_WIRELESS_CONFIRM_STEP</GOTO> 
			</CASE>						
		</SWITCH>



		<!-- 
		========================================================================================= 
				Connecting Dialog
		=========================================================================================					
		--> 
		
		<LABEL>WSP_CI3_WIRELESS_CONNECTING_STEP</LABEL> 
	
		<IF cmd="check_variable" param0="VAL.WIRELESS_SETTING_METHOD" param1="USB" >
			<TRUE>
				<IF cmd="wsp_find_printer">
					<FALSE>	<COMMAND cmd="OPEN_DLG" param0="WSP_CONNECT_DEVICE" /> </FALSE>
				</IF> 
			</TRUE>
		</IF>
		
		<LABEL>WSP_CI3_WIRELESS_WIFI_CONNECTING_STEP</LABEL> 
		
		<IF cmd="check_variable" param0="VAL.WIRELESS_METHOD" param1="YES">
			<TRUE><COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT_NETWORK"/></TRUE>
			<FALSE><COMMAND cmd="set_variable" param0="VAL.CONNECTING_PARAM" param1="WSP_CONNECT"/></FALSE>
		</IF>
					
		<SWITCH cmd="open_dlg" param0="WSP_WIRELESS_CONNECTING" param1="#VAL.CONNECTING_PARAM#">
			<!--  101 : WSP_ERROR_DEVICE_DATA WSP_CHECKING_ERROR_DEVICE_DATA --> 
			<CASE value="101"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="1"/> </CASE>
		
			<!--  104 : WSP_ERROR_SSID -->
			<CASE value="104"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1=""/>	</CASE>
			 
			<!--  105 : WSP_ERROR_SECURITY --> 
			<CASE value="105"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="3"/>	</CASE>
			
			<!--  106 : WSP_ERROR_PC_CONNECTION_ERROR -->
			<CASE value="106"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="2"/>	</CASE>

			<!--  107 : WSP_ERROR_CONNECTED_WIRED -->
			<CASE value="107"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="4"/>	</CASE>
			
			<!--  108 : WSP_ERROR_IP_NOT_ALLOCATED -->
			<CASE value="108"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="5"/>	</CASE>
			
			<!--  109 : WSP_ERROR_GENERAL_WIRELESS -->
			<CASE value="109"> <COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="6"/>	</CASE>
			
			<CASE value="122">  				
				<GOTO>SELECT_WIRELESS_SETTING_METHOD</GOTO>	
			</CASE>
			
			<!-- Success -->
			<CASE value="0">  				
				<GOTO>WIRELESS_SETTING_SUCCESS</GOTO>	
			</CASE>

			
			<!--  109 : WSP_ERROR_GENERAL_WIRELESS -->
			<DEFAULT><COMMAND cmd="set_variable" param0="VAR.INT.FAIL_NUM" param1="6"/></DEFAULT>

			
		</SWITCH>
		
			
	
		<COMMAND cmd="open_dlg" param0="WSP_CONNECTING_FAILURE#VAR.INT.FAIL_NUM#" />
		
		<GOTO>WSP_CI3_WIRELESS_CONNECTING_STEP</GOTO>
		
		
		<!-- 
		===================================================================
		Wireless Setting Completed
		===================================================================
		-->
		
		<LABEL>WIRELESS_SETTING_SUCCESS</LABEL>		
		
	<!--<COMMAND cmd="open_dlg" param0="WSP_SETTING_COMPLETE_WIRELESS_PSU"/>			-->
		<COMMAND cmd="open_dlg" param0="WSP_SETTING_COMPLETE_WIRELESS_WITH_INFO"/>
			
		
		<LABEL>WSP_PSU_WIRELESS_CANCEL</LABEL>		
		<COMMAND cmd="terminate" param0="IDCANCEL"/>
		
				
	</WSP_FLOW_EPM>
	
	
		
	<EMBEDDED_INSTALL>
		<COMMAND cmd="set_setup_type" param0="INSTALL" />
		<COMMAND cmd="check_spooler" />					
		
		<COMMAND cmd="open_dlg" param0="START_EMBEDDED" step_dlg="TRUE"/>
		
		<COMMAND cmd="set_history" param0="EMBEDDED_INSTALL"/>
		
		<COMMAND cmd="set_history_section" param0="LICENSE_AGREEMENT" step_dlg="FALSE"/>
		<COMMAND cmd="open_dlg" param0="LICENSE_AGREEMENT" step_dlg="TRUE"/>
		<COMMAND cmd="set_install_mode" param0="SMART_INST" />				
		<COMMAND cmd="WRITE_ITEM_INFO" /> 
		<COMMAND cmd="set_history_section" param0="INSTALLATION" step_dlg="TRUE"/>
		<COMMAND cmd="open_dlg" param0="COPY_FILE"/> 
		<COMMAND cmd="open_dlg" param0="INSTALL"/> 
		<COMMAND cmd="set_history_section" param0="FINISH" step_dlg="TRUE"/>
		<COMMAND cmd="open_dlg" param0="FINISH"/>
		
		<!--
			*
			*
			*	END of Installation
			*	
			*
			-->
		<COMMAND cmd="terminate"/>
	</EMBEDDED_INSTALL>
	
	
	
	
	<!-- 
			*
			*
			*	Command Flow
			*
			*
	-->
	<FLOW_INIT>
	
		<!-- VC Distributable -->
		
	 	<IF cmd="check_option" param0="install_vc" param1="TRUE">
			<TRUE>
			 		<IF cmd="is_vc_installed" param0="INSTALL_VC" param1="VC_REDIST">	 		
						<FALSE> <COMMAND cmd="execute_file_wait" param0="$INST_SRC_DIR$\DATA\vcredist_x86.exe" param1="/q /r:n" param2="INSTALL_VC" /> </FALSE>
					</IF>
			</TRUE>
		</IF>

		<!-- Prepare Advertising Dialog -->
		<!-- <COMMAND cmd="prepare_advertising"/> -->
		
		<!-- Load DLLs -->
		<!-- <COMMAND cmd="load_dlls"/> -->
		
		<!-- Search Component -->
		<COMMAND cmd="search_components"/>

		
		<!-- Check the spooler status and start spooler if spooler is stopped -->
		<COMMAND cmd="check_spooler" />
		
		<!-- Set max connection for Smart update -->
		<IF cmd="check_option" param0="smartupdate" param1="TRUE" >
			<TRUE>
				<COMMAND cmd="set_max_connection" dwparam="10"/>			
			</TRUE>
		</IF>
		
		<!-- Add Firewall exception -->
		<COMMAND cmd="add_firewall_exception" />
		
		<!-- Turn Off seaching update server when PnP -->
		<COMMAND cmd="turn_off_search_update"/> 
		
		<!-- Pre Install -->
		<COMMAND cmd="copy_file" param0="PRE_INSTALL_INFO/SSPORT_XP64"/>
		<COMMAND cmd="copy_file" param0="PRE_INSTALL_INFO/SSPORT_VISTA32"/>
		<COMMAND cmd="copy_file" param0="PRE_INSTALL_INFO/SSPORT_VISTA64"/>
		<COMMAND cmd="execute_file" param0="$INST_SRC_DIR$\VECP\VISTA_64\sskinst.exe"/>
		
	</FLOW_INIT>
</FLOW>